package com.ch.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ch.model.entity.Paiban;
import com.ch.model.query.PaibanQuery;
import com.ch.service.PaibanService;
import com.ch.mapper.PaibanMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Lenovo
* @description 针对表【paiban】的数据库操作Service实现
* @createDate 2024-06-14 09:43:05
*/
@Service
@RequiredArgsConstructor
public class PaibanServiceImpl extends ServiceImpl<PaibanMapper, Paiban>
    implements PaibanService{

	private final PaibanMapper paibanMapper;

	@Override
	public IPage<Paiban> getPage(PaibanQuery paibanQuery) {
		int pageNum = paibanQuery.getPageNum();
		int pageSize = paibanQuery.getPageSize();
		Page<Paiban> page = new Page<>(pageNum, pageSize);
		Page<Paiban> PPage=paibanMapper.getPage(page,paibanQuery);
		return PPage;
	}

	@Override
	public List<Paiban> getList() {
		return paibanMapper.getList();
	}
}




